<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:i18n="http://genshi.edgewall.org/i18n" py:strip="">
  <form id="edit" action="${href.wiki(page.name)}" method="post">
    <fieldset class="iefix">
      <input type="hidden" name="from_editor" value="1" />
      <input type="hidden" name="action" value="edit" />
      <input type="hidden" name="version" value="$page.version" />
      <input type="hidden" id="scroll_bar_pos" name="scroll_bar_pos"
             value="$scroll_bar_pos" />
      <div id="rows">
        <py:if test="not sidebyside">
          <label for="editrows">Adjust edit area height:</label>
          <select size="1" name="editrows" id="editrows" tabindex="43">
            <option py:for="rows in range(8, 42, 4)" value="$rows"
                    selected="${str(rows) == edit_rows or None}">
              $rows
            </option>
          </select>
        </py:if>
        <label for="sidebyside" title="Selecting and pressing 'Preview' enters a two-column [edit|preview] mode">
          Edit side-by-side
        </label>
        <input type="checkbox" name="sidebyside" id="sidebyside" checked="$sidebyside" />
      </div>
      <p><textarea id="text" class="wikitext${not sidebyside and ' trac-resizable' or ''}" name="text" cols="80" rows="$edit_rows">
$page.text</textarea>
      </p>
      <div id="help" i18n:msg="">
        <b>Note:</b> See <a href="${href.wiki('WikiFormatting')}">WikiFormatting</a> and
        <a href="${href.wiki('TracWiki')}">TracWiki</a> for help on editing wiki content.
      </div>
    </fieldset>
    <div class="trac-nav" py:if="sidebyside" py:choose="">
      <a py:when="diff" href="#content" title="See the start of the diffs">Review</a>
      <a py:otherwise="" href="#content" title="See the start of the preview">Preview</a>
      &uarr;
    </div>
    <fieldset id="changeinfo">
      <legend>Change information</legend>
      <div id="changeinfo1">
        <div py:if="authname == 'anonymous'" class="field">
          <label>Your email or username:<br />
            <input id="author" type="text" name="author" size="30" value="$author" />
          </label>
          <p py:if="author == 'anonymous'" class="hint">
            <i18n:msg>E-mail address and user name can be saved in the <a href="${href.prefs()}">Preferences</a>.</i18n:msg>
          </p>
        </div>
        <div class="field">
          <label>Comment about this change (optional):<br />
            <input id="comment" type="text" name="comment" size="60" value="$comment" />
          </label>
        </div>
      </div>
      <div py:if="'WIKI_ADMIN' in perm(page.resource)" id="changeinfo2" class="options">
        <label><input type="checkbox" name="readonly" id="readonly"
                      checked="${page.readonly or None}" />
          Page is read-only
        </label>
      </div>
    </fieldset>
    <div class="buttons" py:choose="action">
      <py:when test="'collision'">
        <input type="submit" name="preview" value="${_('Preview')}" disabled="disabled" />&nbsp;
        <input type="submit" name="merge" value="${_('Merge changes')}" accesskey="r" />&nbsp;
        <input type="submit" name="save" value="${_('Submit changes')}" disabled="disabled" />&nbsp;
      </py:when>
      <py:otherwise>
        <input type="submit" name="preview" value="${_('Preview Page')}" accesskey="p" />&nbsp;
        <input type="submit" name="diff" value="${_('Review Changes')}" accesskey="r" />&nbsp;
        <input type="submit" id="save" name="save" value="${_('Submit changes')}" />&nbsp;
      </py:otherwise>
      <input type="submit" name="cancel" value="${_('Cancel')}" />
    </div>
  </form>
</html>
